﻿using RAP.Framework.Libary.DomTemplateBuilder.Handler.Conditional;
using RAP.Framework.Libary.DomTemplateBuilder.Element.Switch;
using RAP.Framework.Libary.DomTemplateBuilder.Interface;

namespace RAP.Framework.Libary.DomTemplateBuilder.Handler.SwitchCase
{
	/// <summary>
	/// 
	/// </summary>
	public class CaseHandler : CompareHandler
    {
        public override bool IsCondition ( object rootParamObject, object parentParamObject, ITemplateRenderContext context )
        {
            parentParamObject = this.GetParamObject ( rootParamObject, parentParamObject, context );
			var handler = ( this.Element as Case ).ConditionHandler;
            return handler.IsCondition ( rootParamObject, parentParamObject, context );
        }
    }
}
